Skip to content

First PR for Gantt Charts - Adding Tests Very Soon #460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jun 18, 2016
Merged

First PR for Gantt Charts - Adding Tests Very Soon #460

merged 28 commits into from
Jun 18, 2016

Conversation

Kully
Copy link
Contributor

@Kully Kully commented May 16, 2016

Adding Tests Very Soon

@Kully
Copy link
Contributor Author

Kully commented May 17, 2016

@theengineear
Copy link
Contributor

Awesome! I'm not gonna have time to take a solid peek at this until later in the week. One quick comment though. It might be cool to have a label for the color scale (about the %task done).

@Kully
Copy link
Contributor Author

Kully commented May 17, 2016

Awesome! I'm not gonna have time to take a solid peek at this until later in the week. One quick comment though. It might be cool to have a label for the color scale (about the %task done).

You mean like 'Portland' over top the colorscale bar?

@theengineear
Copy link
Contributor

Ah, sorry, totally vague. I mean like:

image

@theengineear
Copy link
Contributor

It's cool if others think this is a bad call, but I wonder if folks who don't know what a gantt chart is would understand what those colors mean immediately.

@Kully
Copy link
Contributor Author

Kully commented May 17, 2016

It's cool if others think this is a bad call, but I wonder if folks who don't know what a gantt chart is would understand what those colors mean immediately.

We should just paste the full doc string on the side of the graph.

@jackparmer
Copy link
Contributor

It's cool if others think this is a bad call, but I wonder if folks who don't know what a gantt chart is would understand what those colors mean immediately.

Makes sense to me, I didn't get what the color bar was for either. Should we make the color bar and sequential colorscale a kwarg rather than the default? I think the default color meaning on Gantt charts is usually categorical with a qualitative color palette. I'm thinking of this one, for example, http://moderndata.plot.ly/gantt-charts-in-r-using-plotly/. Or the colors simply help the eye differentiate between different tasks. In either case, no need for a color bar.

@Kully
Copy link
Contributor Author

Kully commented May 30, 2016

Or the colors simply help the eye differentiate between different tasks. In either case, no need for a color bar.

Okay. Will get cracking on this shortly.

@Kully
Copy link
Contributor Author

Kully commented May 31, 2016

@theengineear @jackparmer

I just need to add dictionary compatibility so a user can assign a color to a value in the indexing column.

@Kully
Copy link
Contributor Author

Kully commented Jun 2, 2016

@theengineear @jackparmer

Tests are working.

I want to get a legend working in this Gantt chart as well. @theengineear do you have any ideas on how to do this? I tried appending some stuff to data to just display the legend, but it didn't work.

tls.FigureFactory.create_gantt, df,
colors=colors_dict_good)

def test_gantt_all_args(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great test!

@theengineear
Copy link
Contributor

I want to get a legend working in this Gantt chart as well.

Can you show me a mock of what you're trying to achieve? It can be incredibly rough, or even just a text description.

@jackparmer
Copy link
Contributor

Hey @Kully - You could try using the legendonly attribute for a scatter trace type, then make the scatter the same color as the Gantt rectangle and turn off hover text:

https://plot.ly/python/reference/#scatter-visible

Then you could get optional labels in the legend like "Task 1", "Task 2", that match the color of the Gantt rectangles.

@Kully
Copy link
Contributor Author

Kully commented Jun 3, 2016

Can you show me a mock of what you're trying to achieve? It can be incredibly rough, or even just a text description.

gantt chart

@theengineear
Copy link
Contributor

@etpinard or @mdtusz could you give us a pointer on this one?

#460 (comment)

I want to get a legend working in this Gantt chart as well. ...I tried appending some stuff to data to just display the legend, but it didn't work.

It seems like we need to get shapes to show in the legend. (1) possible? (2) is there a workaround that you can think of?

The legendonly seems like it would work, did you get a chance to try that @Kully?

@Kully
Copy link
Contributor Author

Kully commented Jun 3, 2016

The legendonly seems like it would work, did you get a chance to try that @Kully?

I tried it out but didn't have any luck. The legend wasn't showing up but I may have been doing it wrong.

@Kully
Copy link
Contributor Author

Kully commented Jun 3, 2016

It seems like we need to get shapes to show in the legend. (1) possible? (2) is there a workaround that you can think of?

I think it should be possible (as I got the colormap to be visible via an invisible trace). I think I might be missing something with my syntax

@Kully
Copy link
Contributor Author

Kully commented Jun 17, 2016

@theengineear

@Kully
Copy link
Contributor Author

Kully commented Jun 17, 2016

screen shot 2016-06-17 at 1 44 36 pm

screen shot 2016-06-17 at 1 45 43 pm

df = [dict(Task='Job A',
Start='2009-02-01',
Finish='2009-08-30',
Complete='a')]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No big deal (not worth changing here), but if your just using dict, it's typically more common to use the literal notation {}.

@theengineear
Copy link
Contributor

Awesome! 💃 after you've added those tests! The other comments are non-blocking.

@Kully Kully merged commit 36686ad into master Jun 18, 2016
@Kully Kully deleted the Gantt branch June 18, 2016 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants